package com.huanzhidadi.java8inaction.chapter7.responsibilitychain;

/**
 * 责任链模式
 */
public class Client {

    public static void main(String[] args) {

        ProcessingObject<String> p1 = new HeaderTextProcessing();
        ProcessingObject<String> p2 = new CheckerProcessing();

        p1.setSuccessor(p2);

        String result = p1.handle("Hello work!!");
        System.out.println(result);
    }

}
